<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var o1 = {
            name: "home",
            age: 20
        };
        var tmp = 100
        Object.defineProperty(o1, 'income', {
            value: 100,
            writable: true, //设置属性是否可写 默认false
            enumerable: true, //设置属性是否可以枚举 默认是false
            configurable: true, //设置属性是否可以删除配置 默认是false
            // 这个是vue模块
            // // 拾取器
            // get() {
            //     return 100;
            // },
            // // 设置器
            // set(val) {
            //     console.log(val, '呵呵')
            // }
        })
        console.log('o1');
        console.log(o1.income);
        o1.income = 100;
        console.log(o1.income);
    </script>
</head>

<body>

</body>

</html>